(function ($) {
  Drupal.behaviors.balo360Com = {
    attach: function (context) {
      $(window).load(function(){
        jQuery('#content-inside > .gird-container').matchHeights();
      });
    }
  };

  $.fn.matchHeights = function (settings) {
    settings = jQuery.extend(this, {
      minHeight: null,
      maxHeight: null
    }, settings);
    tallest = settings.minHeight ? settings.minHeight : 0;
    this.each(function () {
      if ($(this).innerHeight() > tallest) {
        tallest = $(this).outerHeight()
      }
    });
    if (settings.maxHeight && tallest > settings.maxHeight) {
      tallest = settings.maxHeight;
    }
    return this.each(function () {
      extra = $(this).innerHeight() - $(this).height();
      extra += $(this).outerHeight() - $(this).innerHeight();
      $.browser.msie && $.browser.version == 6 || settings.maxHeight ? $(this).css({
        height: tallest - extra
      }) : $(this).css({
        "min-height": tallest - extra
      })
    })
  }
})(jQuery);
